<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

  <form id="form_signup" method="post" th:action="@{/signup}" th:object="${user}">
      <input th:field="*{user_name}" type="text" name="user_name" id="user_name" placeholder="用户名">
      <input th:field="*{user_pw}" type="text" name="user_password" id="user_password" placeholder="密码">
      <input type="button" onclick="signup()" value="注册">
  </form>

</body>
</html>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>
<script type="text/javascript" src='/js/stopExecutionOnTimeout.js?t=1'></script>
<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/js/Particleground.js"></script>
<script type="text/javascript" src="/js/Treatment.js"></script>
<script type="text/javascript" src="/js/jquery.mockjax.js"></script>
<script type="text/javascript">
    function signup() {
        var user_name = $("#user_name").val();
        var user_pw = $("#user_password").val();
        if(user_name =="" || user_pw == "" || user_name ==null || user_pw == null ){
            alert("请填写注册信息");
        }else{
            $("#form_signup").submit();
        }
    }
</script>
